home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / TeXsource / commontex / h / dvi < prev    next >
Encoding:
Text File  |  1988-04-08  |  2.1 KB  |  108 lines

  1. /*
  2.  *    Copyright 1986, 1987 Pat Joseph Monardo. All rights reserved.
  3.  *    Copying of this file is granted according to the provisions 
  4.  *    specified in the file COPYING which must accompany this file.
  5.  */
  6.  
  7.  
  8. /*
  9.  *        dvi.h
  10.  */
  11.  
  12. global    byte_file    dvi_file;
  13.  
  14. #define    SET_CHAR_0        0
  15. #define    SET1            128
  16. #define    SET_RULE        132
  17. #define    PUT1            133
  18. #define    PUT_RULE        137
  19. #define    NOP                138
  20. #define    BOP                139
  21. #define    EOP                140
  22. #define    PUSH            141
  23. #define    POP                142
  24. #define    RIGHT1            143
  25. #define    W0                147
  26. #define    W1                148
  27. #define    X0                152
  28. #define    X1                153
  29. #define    DOWN1            157
  30. #define    Y0                161
  31. #define    Y1                162
  32. #define    Z0                166
  33. #define    Z1                167
  34. #define    FNT_NUM_0        171
  35. #define    FNT1            235
  36. #define    XXX1            239
  37. #define    XXX4            242
  38. #define    FNT_DEF1        243
  39. #define    PRE                247
  40. #define    POST            248
  41. #define    POST_POST        249
  42. #define    ID_BYTE            2
  43.  
  44. global    qword        c;
  45. global    qword        f;
  46. global    ptr            g;
  47. global    int            dead_cycles;
  48. global    bool        doing_leaders;
  49. global    val            last_bop;
  50. global    val            lq;
  51. global    val            lr;
  52. global    val            lx;
  53. global    scal        max_h;
  54. global    scal        max_v;
  55. global    int            max_push;
  56. global    scal        rule_ht;
  57. global    scal        rule_dp;
  58. global    scal        rule_wd;
  59.  
  60. global    fnt            dvi_f;
  61. global    scal        dvi_h;
  62. global    scal        dvi_v;
  63. global    scal        cur_h;
  64. global    scal        cur_v;
  65. global    int            cur_s;
  66.  
  67. global    ptr            down_ptr;
  68. global    ptr            right_ptr;
  69.  
  70. global    byte        dvi_buf[];
  71. global    ptr            dvi_limit; 
  72. global    ptr            dvi_ptr;
  73. global    val            dvi_offset;
  74. global    val            dvi_gone;
  75. global    bool        output_active;
  76. global    int            total_pages;
  77.     
  78. #define    MOVEMENT_NODE_SIZE        3
  79. #define    location(L)                mem[L + 2].i
  80.  
  81. #define    synch_h() \
  82.     {if (cur_h != dvi_h) \
  83.         {movement(cur_h - dvi_h, RIGHT1); dvi_h = cur_h;}}
  84.  
  85. #define    synch_v() \
  86.     {if (cur_v != dvi_v) \
  87.         {movement(cur_v - dvi_v, DOWN1); dvi_v = cur_v;}}
  88.  
  89. #define    dvi_out(B) \
  90.     {dvi_buf[dvi_ptr] = B; \
  91.     incr(dvi_ptr); \
  92.     if (dvi_ptr == dvi_limit) \
  93.         dvi_swap();}
  94.  
  95. #define    write_dvi(a, b) \
  96.     {fwrite(&dvi_buf[a], sizeof(dvi_buf[0]), b - a, dvi_file);}
  97.  
  98.  
  99. int        dvi_swap();
  100. int        dvi_four();
  101. int        dvi_pop();
  102. int        dvi_font_def();
  103. int        movement();
  104. int        prune_movements();
  105. int        hlist_out();
  106. int        vlist_out();
  107. int        ship_out();
  108.